/*
 * @Author: pengtianrui 2276608413@qq.com
 * @Date: 2024-08-23 09:21:39
 * @LastEditors: Wang Shuo wangshuo@sgsimulation.com
 * @LastEditTime: 2024-08-30 13:44:10
 * @FilePath: \SGFEM\DataStructure\FEM\Property\src\PRODData.cpp
 */
#include "DataStructure/Input/Property/PRODData.h"

#include "DataStructure/Common/Validation.h"

bool SG::DataStructure::FEM::operator== (const PRODData &a, const PRODData &b)
{
    if (a.m_id != b.m_id)
    {
        return false;
    }
    if (a.m_mId != b.m_mId)
    {
        return false;
    }
    if (!SG::DataStructure::Common::isNear (a.m_area, b.m_area))
    {
        return false;
    }
    if (!SG::DataStructure::Common::isNear (a.m_torsionFactor, b.m_torsionFactor))
    {
        return false;
    }
    if (!SG::DataStructure::Common::isNear (a.m_torsionStressfactor, b.m_torsionStressfactor))
    {
        return false;
    }
    if (!SG::DataStructure::Common::isNear (a.m_nsm, b.m_nsm))
    {
        return false;
    }
    if (a.m_domainId != b.m_domainId)
    {
        return false;
    }
    return true;
}